#include <iostream>
#include <queue>
using namespace std;

int main() {
    long long n, k, x, sum = 0;
    cin >> n >> k;
    priority_queue<long long> pq;
    for (int i = 0; i < n; i++) {
        cin >> x;
        pq.push(x);
        sum += x;
    }

    while (k--) {
        if (pq.top() % 2 == 0) {
            sum -= (pq.top() / 2);

        }
        else { k++; }
        pq.pop();
    }
    cout << sum;
    return 0;
}
